package com.tuzhi.sys.service.impl;

import com.tuzhi.base.jpa.repository.BaseRepo;
import com.tuzhi.base.service.impl.AbsBaseService;
import com.tuzhi.sys.jpa.entity.RoleMenuEntity;
import com.tuzhi.sys.jpa.entity.pk.RoleMenuPk;
import com.tuzhi.sys.jpa.repository.RoleMenuViewRepo;
import com.tuzhi.sys.service.RoleMenuViewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleMenuViewViewServiceImpl extends AbsBaseService<RoleMenuEntity, RoleMenuPk> implements RoleMenuViewService {
    @Autowired
    RoleMenuViewRepo roleMenuViewRepo;

    @Override
    protected BaseRepo getThisRepo() {
        return roleMenuViewRepo;
    }


    @Override
    public List<String> loadPerms4Role(Long roleId) {
        return roleMenuViewRepo.loadPerms4Role(roleId);
    }

    @Override
    public List<String> loadPerms4Role(String roleName) {
        return roleMenuViewRepo.loadPerms4Role(roleName);
    }

    @Override
    public List<String> loadUrls4Role(Long roleId) {
        return roleMenuViewRepo.loadUrls4Role(roleId);
    }

    @Override
    public List<String> loadUrls4Role(String roleName) {
        return roleMenuViewRepo.loadUrls4Role(roleName);
    }


}
